package com.num2.form.lhr;

import java.util.List;

import com.num2.model.lhr.allSelModel;

public class NextPage {
	//总共的页数
	private int totalPage;
	//当前为第几页
	private int currentPage=1;
	//每页显示多少条内容
	private int sizePage=10;
	//获取的内容
	private List<allSelModel>  resPage;

	//总共有多少条内容
	private int numPage;
	//当前条数
	private int currentSection;
	//条件查询的条件
	private String query;
	
	
	public String getQuery() {
		return query;
	}
	public void setQuery(String query) {
		this.query = query;
	}
	public int getTotalPage() {
		totalPage=(numPage%sizePage==0)?(numPage/sizePage):(numPage/sizePage+1);
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public int getCurrentPage() {
		if(currentPage==0){
			currentPage=1;
		}
		if(currentPage>=totalPage){
			currentPage=totalPage;
		}
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	public int getSizePage() {
		if(sizePage==0){
			sizePage=10;
		}
		return sizePage;
	}
	public void setSizePage(int sizePage) {
		this.sizePage = sizePage;
	}
	public List<allSelModel> getResPage() {
		return resPage;
	}
	public void setResPage(List<allSelModel> resPage) {
		this.resPage = resPage;
	}
	public int getNumPage() {
		return numPage;
	}
	public void setNumPage(int numPage) {
		this.numPage = numPage;
	}
	public int getCurrentSection() {
		//当前条数为当前页数乘每页显示条数
		currentSection=(currentPage-1)*sizePage;
		return currentSection;
	}
	public void setCurrentSection(int currentSection) {
		this.currentSection = currentSection;
	}
	
	
	
}
